<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>机构管理-新致双录云平台</title>
	<meta name="description" content="微营销管理平台">
	<meta name="keywords" content="index">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="renderer" content="webkit">
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="icon" type="image/png" href="../../assets/img/main/liantongLOGO.jpg">
	<link rel="apple-touch-icon-precomposed" href="../../assets/libs/amazeui/i/app-icon72x72@2x.png">
	<meta name="apple-mobile-web-app-title" content="Amaze UI" />
	<link rel="stylesheet" href="../../assets/libs/amazeui/css/amazeui.min.css" />
	<link rel="stylesheet" href="../../assets/libs/amazeui/css/amazeui.datatables.min.css" />
	<link rel="stylesheet" href="../../assets/libs/amazeui/css/app.css?v2017010301">
	<link rel="stylesheet" href="../../assets/css/core.css?v2017010301">
	<style>
		.sys-query-title{
			border-bottom: 1px solid #e6e6e6;
			width: 25%;
			padding-bottom:8px;
			float: left;
		}
		.sys-query-title-spacing{
			margin-right: 12.5%;
		}
		.sys-query-title-input{
			border: none !important;
		}
		.sys-query-button-reset{
			color: #000;
			background-color: #fff;
			border-color: #d9d9d9;
			border-radius:4px;
			padding: 0.5em 2em;
			margin-left:6px;
		}
		.sys-query-button-select{
			color: #fff;
			background-color: #1890ff;
			border-color: #1890ff;
			border-radius:4px;
			padding: 0.5em 2em;
		}
		.sys-query-color{
			color: #999999;
		}
		.sys-query-color2{
			background-color: #F4F4F4;
		}
		.sys-query-color3{
			color: #333333!important;
		}
		.sys-query-color4{
			color: #616161!important;
		}
		.sys-query-button-maintenance{
			border: none !important;
			color: #1890FF !important;
		}
		.am-table-striped>tbody>tr:nth-child(odd)>td{
			background-color: #FFFFFF;
		}
		.am-table-striped>tbody>tr:nth-child(even)>td{
			background-color: #FBFBFB;
		}
		.am-table-compact>tbody>tr>td{
			border-top:none!important;
		}
		.sys-query-spacing{
			margin-bottom:0px !important;
		}
		.sys-query-spacing2{
			margin-bottom:2rem !important;
		}
		.sys-query-background{
			border-top: 5px solid #e9ecf3;
		}
		.sys-query-background2{
			background-color: #FFFFFF!important;
		}
		.version-information{
			border-bottom: 1px solid #e6e6e6;
			padding:15px!important;
		}
		.version-information2{
			border-radius:4px!important;
			width: 400px;
			border-bottom: 1px solid #e6e6e6;border-radius: 4px;
		}
		.version-information3{
			border:1px solid rgba(230,230,230,1);
			border-radius: 4px;
			font-size: 13px;
			padding: 5px;
		}
		.version-information4{
			font-size: 14px!important;
			margin-right: 100px;
			margin-left: 100px;
			margin-bottom: 0px!important;
			font-weight: 500;
		}
		.version-information-file{
			border-radius:4px;
			font-size: 13px;
		}
		.triangle-down {
			width: 0;
			height: 0;
			border-left: 5px solid transparent;
			border-right: 5px solid transparent;
			border-top: 6px solid #999999;
			float: right;
			margin-right: 15px;
			margin-top: 12px;
		}
		.bottom-font{
			font-size: 13px;
			font-family: PingFangSC-Regular, PingFang SC;
			color: #666666;
			line-height: 20px;
			margin: 5px;
		}
		.bottom-style-public{
			border-color: #fbfbfb!important;
			background-color:#fbfbfb !important;
			border-radius: 5px!important;
		}
	</style>
</head>

<body data-type="index" page-text="组织机构管理" style="overflow: hidden">
	<!--
    Conductor:Kangmengmeng
    Author:Jiangna
    Time:2016.12.07 14:00
-->
	<div id="main" class="am-g tpl-g" v-cloak>
		<!-- 内容区域 -->
		<div class="sys-query-background2 tpl-content-wrapper content-margin-left">
			<!-- TODO 内容显示区域 -->
			<div class="am-cf">
				<div class="row">
					<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
						<!--第一个-->
						<div class="sys-query-spacing sys-query-background widget am-cf">
							<div class="widget-body  am-fr widget-search">
								<form class="sys-query-title-input am-form tpl-form-border-form tpl-form-border-br">
									<div class="am-u-sm-12 am-u-sm-12 am-u-sm-12 del-padding">
										<div class="am-form-group am-form-group-sm am-u-sm-8 am-u-md-4 am-u-lg-4 sys-query-title sys-query-title-spacing">
											<label for="role-no" class="am-form-label am-u-sm-4">机构名称</label>

											<div class="am-u-sm-6  am-u-sm-pull-2">
												<input type="text" class="sys-query-title-input" id="role-no"
													placeholder="请输入" v-model="branchName">
											</div>
										</div>
										<div class="am-form-group am-form-group-sm am-u-sm-8 am-u-md-4 am-u-lg-4 sys-query-title sys-query-title-spacing">
											<label for="role-name" class="am-form-label am-u-sm-4">机构简称</label>

											<div class="am-u-sm-6  am-u-sm-pull-2">
												<input type="text" class="sys-query-title-input" id="role-name"
													placeholder="请输入" v-model="branchAbbr">
											</div>
										</div>
										<div class="am-form-group am-form-group-sm am-u-sm-8 am-u-md-4 am-u-lg-4 sys-query-title">
											<label for="role-name" class="am-form-label am-u-sm-4">机构等级</label>

											<div class="am-u-sm-6  am-u-sm-pull-2">
												<input type="text" class="sys-query-title-input" id="role-level"
													   placeholder="请输入" v-model="branchLevel">
											</div>
										</div>
									</div>

									<div class="am-u-sm-12 am-u-sm-12 am-u-sm-12 del-padding">
										<div class="am-form-group am-form-group-sm am-u-sm-8 am-u-md-4 am-u-lg-4 sys-query-title sys-query-title-spacing">
											<label class="am-form-label am-u-sm-4">状态</label>
											<div class="am-u-sm-6 am-u-sm-pull">
													<select v-model="status" @change="statusValue(event)" style="border:none!important;">
														<option value="">请选择</option>
														<option v-for="(item,index) in statusList" :key="index"
																:value="item.value">{{item.status}}</option>

														<!-- <option v-for="item of agentCates" v-bind:value="item.code">{{item.name}}</option> -->
													</select>
											</div>
											<div class="triangle-down"></div>
										</div>
										<div class="am-u-sm-9 am-u-sm-push-3 am-u-md-7 am-u-md-push-5 am-u-lg-7 am-u-lg-push-5" style="margin-top: 20px">
											<button type="button"
													class="am-btn sys-query-button-select tpl-btn-bg-color-success am-btn-xs"
													@click="query()">
												<span class="am-icon-search"></span>&nbsp;查询
											</button>
											<button type="button"
													class="am-btn sys-query-button-reset tpl-btn-bg-color-success am-btn-xs"
													@click="resetBtn()">
												<span class="am-icon-reply"></span>&nbsp;重置
											</button>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>

				<!--第二个-->
				<div class="row">
					<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
						<div class="widget am-cf">
							<div class="widget-body  am-fr">
								<div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
									<div class="sys-query-spacing2 am-form-group">
										<div class="am-btn-toolbar">
											<div class="am-btn-group am-btn-group-xs">
												<button type="button"
													class="am-btn sys-query-button-select"
													@click="addBtn()">
													<span class="am-icon-plus"></span>&nbsp;新增
												</button>
												<!-- <button type="button" class="am-btn am-btn-default am-btn-danger"
													@click="del()">
													<span class="am-icon-trash-o"></span>&nbsp;删除
												</button> -->
											</div>
										</div>
									</div>
								</div>
								<div class="am-u-sm-12">
									<table width="100%"
										class="am-table am-table-compact am-table-striped tpl-table-black am-table-centered"
										id="example-r">
										<thead>
											<tr class="sys-query-color2 sys-query-color3">
												<th>机构id</th>
												<th>机构名称</th>
												<th>机构简称</th>
												<th>级别</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody>
											<tr v-for="(item, index) in queryList" :key="index" class="sys-query-color4">
												<td>{{item.branchId}}</td>
												<td>{{item.branchName}}</td>
												<td>{{item.branchAbbr}}</td>
												<td>{{item.branchLevel}}</td>
												<td>
													<div class="tpl-table-black-operation" style="display: inline-block;">
														<a href="javascript:void(0)"
															@click="gotoPage(item) " class="sys-query-button-maintenance">
															<i class="am-icon-edit" ></i> 
															编辑
														</a>
													</div>
													<div class="tpl-table-black-operation" style="display: inline-block;">
														<a href="javascript:void(0)"
															@click="del(item.seqId) " class="sys-query-button-maintenance">
															<i class="am-icon-trash-o" ></i> 
															删除
														</a>
													</div>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="am-u-lg-12 am-cf">
									<div class="am-fr am-u-sm-12 am-u-md-12 am-u-lg-2">
                                    	<form class="am-form am-pagination">
	                                        <div class="am-u-sm-7 am-u-md-7 am-u-lg-7">
	                                            <input type="number" id="page-num" style="padding: .3em">
	                                        </div>
                                        	<div class="am-u-sm-5 am-u-md-5 am-u-lg-5">
	                                            <div class="am-btn-group-xs">
	                                                <button type="button" class="am-btn am-btn-primary"
	                                                    class="am-disabled"
	                                                    @click="skipPage()">跳转</button>
	                                            </div>
                                            </div>
                                        </form>
                                    </div>
									<div class="am-fr">
										<ul class="am-pagination tpl-pagination">
											<!--<li-->
											<!--v-bind:class="nowPage == 1 ? 'am-disabled' : ''">-->
											<!--<a href="javascript:void(0);" @click="selectPage(1)"><span-->
											<!--class="am-icon-angle-double-left"></span></a>-->
											<!--</li>-->
											<li
													v-bind:class="nowPage == 1 ? 'am-disabled' : ''">
												<a href="javascript:void(0);" @click="offsetPage(-1)"><span
														class="sys-query-color am-icon-angle-left"></span></a>
											</li>
											<li v-for="page in pagination"
												v-bind:class="page != 0 ? (page == nowPage ? 'am-active am-disabled' : '') : 'am-disabled'">
												<a href="javascript:void(0);" @click="selectPage(page)">{{page
													== 0 ? '...' : page}}</a>
											</li>
											<li
													v-bind:class="nowPage == allPages ? 'am-disabled' : ''">
												<a href="javascript:void(0);" @click="offsetPage(1)"><span
														class="sys-query-color am-icon-angle-right"></span></a>
											</li>
											<!--<li-->
											<!--v-bind:class="nowPage == allPages ? 'am-disabled' : ''">-->
											<!--<a href="javascript:void(0);"-->
											<!--@click="selectPage(allPages)"><span-->
											<!--class="am-icon-angle-double-right"></span></a>-->
											<!--</li>-->
										</ul>
									</div>
									<!-- <div class="am-fr am-u-sm-6" style="width: 20%">
										<form class="am-form am-pagination">
											<div class="am-u-sm-7 am-u-md-7 am-u-lg-12">
												<label class="bottom-font">共</label>
												<label class="bottom-font">{{listLength}}</label>
												<label class="bottom-font">条</label>
												<select data-am-selected="{btnWidth: '45%',btnSize:'sm',btnStyle:'am-selected-btn am-btn am-dropdown-toggle am-btn-sm am-btn-default bottom-style-public'}"
														id="pageNumSelect"
														onchange="rowNumChange(value)">
													<option value="10">10条/页</option>
													<option value="20">20条/页</option>
													<option value="30">30条/页</option>
													<option value="40">40条/页</option>
												</select>
											</div>
										</form>
									</div> -->
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--新增-->
		<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
			<div class="am-modal-dialog sys-query-background2 version-information2">
				<div class="am-modal-hd version-information">
					<a href="javascript:void(0);" @click="goBtn()"><span
							class="sys-query-color am-icon-angle-left"></span></a>
					<label class="version-information4">新增机构</label>
					<a href="javascript:void(0);" @click="goBtn()"><span
							class="sys-query-color am-icon-close" style="text-shadow: #FFF"></span></a>
				</div>
				<div class="am-modal-bd" style="margin-top: 20px;border-bottom: none!important">
					<div class="am-form-group-sm am-u-sm-12 am-u-md-6 am-u-lg-6" style="width:100%;margin-bottom: 0.75em;margin-top: 0.75em;">
						<label class="am-form-label am-u-sm-4" style="text-align:right;font-weight:100;font-size: 13px;color:#000">机构ID<span
								style="color: red">*</span></label>
						<div class="am-u-sm-6 am-u-sm-pull-2">
							<input type="text" class="tpl-form-input version-information3"
								   placeholder="请输入机构ID" v-model="branchId">
						</div>
					</div>
					<div class="am-form-group-sm am-u-sm-12 am-u-md-6 am-u-lg-6" style="width:100%;margin-top: 0.75em;">
						<label class="am-form-label am-u-sm-4" style="text-align:right;font-weight:100;font-size: 13px;color:#000">机构名称<span
								style="color: red">*</span></label>
						<div class="version-information-file am-u-sm-6 am-u-sm-pull-2">
							<input type="text" class="tpl-form-input version-information3"
								   placeholder="请输入机构名称" v-model="branchName">
						</div>
					</div>
					<div class="version-information-file am-u-sm-6 am-u-lg-12" style="margin-top:3px ;margin-bottom: 3px;">
						<span id="add-name" style="margin: 5px;color: #F45959;padding-left: 15px"></span>
					</div>
					<div class="am-form-group-sm am-u-sm-12 am-u-md-6 am-u-lg-6" style="width:100%;">
						<label class="am-form-label am-u-sm-4" style="text-align:right;font-weight:100;font-size: 13px;color:#000">机构简称<span
								style="color: red">*</span></label>
						<div class="version-information-file am-u-sm-6 am-u-sm-pull-2">
							<input type="text" class="tpl-form-input version-information3"
								   placeholder="请输入机构简称" v-model="branchAbbr">
						</div>
					</div>
					<div class="version-information-file am-u-sm-6 am-u-lg-12" style="margin-top:3px ;margin-bottom: 3px;">
						<span id="add-nameJC" style="margin: 5px;color: #F45959;padding-left: 15px"></span>
					</div>
				</div>
				<div class="am-modal-footer" style="width: 120%!important;">
					<button type="button"class="am-btn sys-query-button-select tpl-btn-bg-color-success am-btn-xs" @click="add()">提交</button>
					<button type="button" class="am-btn sys-query-button-reset tpl-btn-bg-color-success am-btn-xs" @click="goBtn()">返回</button>
				</div>
			</div>
		</div>
		<!--编辑-->
		<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert2">
			<div class="am-modal-dialog sys-query-background2 version-information2">
				<div class="am-modal-hd version-information">
					<a href="javascript:void(0);" @click="goBtn()"><span class="sys-query-color am-icon-angle-left"></span></a>
					<label class="version-information4">编辑机构</label>
					<a href="javascript:void(0);" @click="goBtn()"><span class="sys-query-color am-icon-close" style="text-shadow: #FFF"></span></a>
				</div>
				<div class="am-modal-bd" style="margin-top: 20px;border-bottom: none!important">
					<div class="am-form-group-sm am-u-sm-12 am-u-md-6 am-u-lg-6" style="width:100%;margin-bottom: 0.75em;margin-top: 0.75em;">
						<label class="am-form-label am-u-sm-4" style="text-align:right;font-weight:100;font-size: 13px;color:#000">机构ID<span
								style="color: red">*</span></label>
						<div class="am-u-sm-6 am-u-sm-pull-2">
							<input type="text" class="tpl-form-input version-information3"
								   placeholder="请输入机构ID" v-model="branchId">
						</div>
					</div>
					<div class="am-form-group-sm am-u-sm-12 am-u-md-6 am-u-lg-6" style="width:100%;margin-top: 0.75em;">
						<label class="am-form-label am-u-sm-4" style="text-align:right;font-weight:100;font-size: 13px;color:#000">机构名称<span
								style="color: red">*</span></label>
						<div class="version-information-file am-u-sm-6 am-u-sm-pull-2">
							<input type="text" class="tpl-form-input version-information3"
								   placeholder="请输入机构名称" v-model="branchName">
						</div>
					</div>
					<div class="version-information-file am-u-sm-6 am-u-lg-12" style="margin-top:3px ;margin-bottom: 3px;">
						<span id="edit-name" style="margin: 5px;color: #F45959;padding-left: 15px"></span>
					</div>
					<div class="am-form-group-sm am-u-sm-12 am-u-md-6 am-u-lg-6" style="width:100%;">
						<label class="am-form-label am-u-sm-4" style="text-align:right;font-weight:100;font-size: 13px;color:#000">机构简称<span
								style="color: red">*</span></label>
						<div class="version-information-file am-u-sm-6 am-u-sm-pull-2">
							<input type="text" class="tpl-form-input version-information3"
								   placeholder="请输入机构简称" v-model="branchAbbr">
						</div>
					</div>
					<div class="version-information-file am-u-sm-6 am-u-lg-12" style="margin-top:3px ;margin-bottom: 3px;">
						<span id="edit-nameJC" style="margin: 5px;color: #F45959;padding-left: 15px"></span>
					</div>
					<div class="am-form-group-sm am-u-sm-12 am-u-md-6 am-u-lg-4" style="width:100%;">
						<label class="am-form-label am-u-sm-4" style="text-align:right;font-weight:100;font-size: 13px;color:#000">状态<span
								style="color: red">*</span></label>
						<div class="version-information-file am-u-sm-6 am-u-sm-pull-2">
							<select v-model="status" @change="statusValue(event)" style="border:1px solid rgba(230,230,230,1)!important;width: 110%;height: 28px;font-size: 13px;border-radius: 4px">
								<option value="">--请选择状态--</option>
								<option v-for="(item,index) in statusList" :key="index" :value="item.value">{{item.status}}</option>
							</select>
						</div>
					</div>
					<div class="version-information-file am-u-sm-6 am-u-lg-12" style="margin-top:3px ;margin-bottom: 3px;">
						<span id="edit-level" style="margin: 5px;color: #F45959;padding-left: 15px"></span>
					</div>
				</div>
				<div class="am-modal-footer" style="width: 120%!important;">
					<button type="button" class="am-btn sys-query-button-select tpl-btn-bg-color-success am-btn-xs" @click="editfn()">提交</button>
					<button type="button" class="am-btn sys-query-button-reset tpl-btn-bg-color-success am-btn-xs" @click="goBtn()">返回</button>
				</div>
			</div>
		</div>
		 <!--提示框-->
		<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert1">
			<div class="am-modal-dialog">
				<div class="am-modal-hd">提示</div>
				<div class="am-modal-bd" style="height:60px;">
					{{tipMsg}}
				</div>
				<div class="am-modal-footer">
					<!-- <span  class="am-modal-btn" @click="confirmBtn">确定</span> -->
					<span class="am-modal-btn" data-am-modal-confirm>确定</span>
				</div>
			</div>
		</div>
	</div>
	<script src="../../assets/js/util/crypto-js.min.js"></script>
	<script src="../../assets/js/util/Aes.js"></script>
	<script src="../../assets/libs/amazeui/js/jquery.min.js"></script>
	<script src="../../assets/libs/vue/vue.min.js"></script>
	<script src="../../assets/libs/amazeui/js/theme.js"></script>
	<script src="../../assets/libs/amazeui/js/amazeui.min.js"></script>
	<script src="../../assets/libs/amazeui/js/amazeui.datatables.min.js"></script>
	<script src="../../assets/libs/amazeui/js/dataTables.responsive.min.js"></script>
	<script src="../../assets/libs/axios.min.js"></script>
	<script src="../../assets/js/util/inner.js?v2017010301"></script>
	<script src="../../assets/js/util/pagination.js?v2017010301"></script>
	<script src="../../assets/env.js?v2017010301"></script>
	<script src="../../assets/js/util/common.js?v2017010301"></script>

	<script src="../../assets/js/biz/sys/organization/organization.js?v2017010301"></script>
</body>

</html>